{php $records2=tag("table=category&condition=moduleid=".$printmoduleid." and parentid=0&pagesize=4&order=listorder,catid&template=null");}
{if $records2}
<div class="main">
	<div class="container">
		<div class="row">
			<div class="boxvalue">
	{loop $records2 $r2}
				<div class="col-sm-3">
					<div class="box-value">
<div class="infomin01 item-top">
	<div class="boxtitle clearfix">
		<div class="menu">
			<font class="active">{strip_tags($r2[catname])}</font>
		</div>
	</div>
	<div class="box01 boxborder clearfix" style="min-height:<?php echo (151+$printinfocount*30)?>px;">
		<div class="clearfix">
		{php $records1=tag("moduleid=".$printmoduleid."&catid=".$r2["catid"]."&condition=thumb!='' and status=3&pagesize=1&order=addtime desc&template=null");}
		{if $records1}
			<a class="texttitle title" href="{$records1[0][linkurl]}" target="_blank" title="{strip_tags($records1[0][title])}">{strip_tags($records1[0][title])}</a>
			<div><img src="{if $records1[0][thumb]}{$records1[0][thumb]}{else}{DT_PATH}template/{$CFG[template]}/skin/images/nopic.png{/if}" align="left">{strip_tags($records1[0][introduce])}</div>
			{php $records1=tag("moduleid=".$printmoduleid."&catid=".$r2["catid"]."&condition=itemid<>".$records1[0][itemid]." and status=3&pagesize=".$printinfocount."&order=addtime desc&template=null");}
		{else}
			{php $records1=tag("moduleid=".$printmoduleid."&catid=".$r2["catid"]."&condition=status=3&pagesize=".($printinfocount+4)."&order=addtime desc&template=null");}
		{/if}
		{loop $records1 $r1}
			<a class="texttitle" href="{$r1[linkurl]}" target="_blank" title="{strip_tags($r1[title])}"><i class="fa fa-certificate"></i> {strip_tags($r1[title])}</a>
		{/loop}
		</div>
	</div>
</div>
					</div>
				</div>
	{/loop}
			</div>
		</div>
	</div>
</div>
{/if}